/*
 * @Author: cl
 * @Description:
 * @Date: 2022-12-06 09:54:48
 * @LastEditTime: 2023-03-27 10:46:33
 * @FilePath: \jsnode\typescript\hello.ts
 * @LastEditors: cl
 */
console.log('hello ts');
var A = /** @class */ (function () {
    function A() {
        this.type = false;
    }
    A.prototype.changeType = function () {
        this.type = !this.type;
    };
    return A;
}());
var B = /** @class */ (function () {
    function B() {
        this.name = '张三';
    }
    B.prototype.getName = function () {
        return this.name;
    };
    return B;
}());
var C = /** @class */ (function () {
    function C() {
    }
    C.prototype.getName = function () {
        throw new Error("Method not implemented.");
    };
    C.prototype.changeType = function () {
        throw new Error("Method not implemented.");
    };
    return C;
}());
Mixins(C, [A, B]);
function Mixins(curCls, itemCls) {
    itemCls.forEach(function (item) {
        Object.getOwnPropertyNames(item.prototype).forEach(function (name) {
            curCls.prototype[name] = item.prototype[name];
        });
    });
}
var studyMixins = function (newClass, items) {
    items.forEach(function (item) {
        Object.getOwnPropertyNames(item.prototype).forEach(function (name) {
            newClass.prototype[name] = item.prototype[name];
        });
    });
};
